package com.mvp.lt.airlineview.showpicture;


import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.ImageView;
import android.widget.ProgressBar;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.engine.GlideException;
import com.bumptech.glide.request.RequestListener;
import com.bumptech.glide.request.RequestOptions;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.mvp.lt.airlineview.R;

import org.greenrobot.greendao.annotation.NotNull;

import java.util.List;

/**
 * @ProjectName: KtApp
 * @Package: com.example.ktapp.ui.roomdata.adapter
 * @ClassName: RoomDataAdapter
 * @Description: 航点动作选择 * @Author: LiuTao
 * @CreateDate: 2020/5/12 11:27
 * @UpdateUser: LiuTao
 */
public class WayPointActionChooseAdapter extends BaseQuickAdapter<PictureBean, BaseViewHolder> {

    private Context mContext;

    public WayPointActionChooseAdapter(List<PictureBean> list, Context context) {
        super(R.layout.item_detail_img, list);
        mContext = context;
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, PictureBean wayPointActionBean) {
        ImageView mImageView = baseViewHolder.getView(R.id.iv);
        RequestOptions requestOptions = new RequestOptions().centerInside();
        Glide.with(mContext)
                .load(wayPointActionBean.getAirPointImageUrl())
                .apply(requestOptions)
                .thumbnail(0.1f)
                .into(mImageView);
    }


    interface LoadPictureListener {
        void onSuccesss(Drawable drawable);
    }
}
